<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%
	Cookie[] c=request.getCookies();
	String username=null;
	if(c!=null){
		for(int i=0;i<c.length;++i){
			if(c[i].getName().equals("JOJUser")==true){
				username=c[i].getValue();
			}
		}
	}
%>
<title>header</title>
</head>
<body>
<center>
<!-- <h1><font color="red">JOJ在线评测系统</font></h1> -->
<img alt="Logo" src="/<%=application.getAttribute("webappname") %>/image/logo.gif"/>
<br/>
当前用户：<%if(username!=null){out.println(username);}else{out.println("未登陆");}%>
<table>
	<tr>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/<%=application.getAttribute("webappname") %>/index.jsp">系统首页</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/<%=application.getAttribute("webappname") %>/scene.jsp">评测状态</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="/<%=application.getAttribute("webappname") %>/file/index.jsp">云端文件</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">题目中心</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">贡献题目</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">用户信息</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">使用手册</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">管理后台</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="">关于JOJ</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
		<td>&nbsp;&nbsp;&nbsp;&nbsp;<a href="
<%
	if(username!=null){
		out.println("/"+application.getAttribute("webappname")+"/user/logout.jsp");
	}else{
		out.println("/"+application.getAttribute("webappname")+"/user/login.jsp");
	}
%>
		">
<%
	if(username!=null){
		out.println("登出");
	}else{
		out.println("登陆");
	}
%>
		</a>&nbsp;&nbsp;&nbsp;&nbsp;</td>
	</tr>
</table>
</center>
</body>
</html>